package com.sky.mapper;

import com.sky.dto.DishDTO;
import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @className DishFlavorMapper.xml
 * @description DishFlavorMapper.xml
 * @auth xxk
 * @date 2025/7/9
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * 批量插入口味数据
     * @param dishFlavors
     * @description description
     */
    void insertBatch(List<DishFlavor> dishFlavors);


    /**
     * 根据菜品Id删除口味
     * @param id
     * @description description
     */
    @Delete("delete from dish_flavor where dish_id = #{id} ")
    void deleteByDishId(Long id);

    /**
     * 根据dishId查询口味
     * @param dishId
     * @return List<DishFlavor>
     * @description description
     */
    List<DishFlavor> getByDishId(Long dishId);
}
